package huawei;

public class LogReport {

    public static void main(String[] args) {
        int[] ints = {3, 7, 40, 10, 60};

        int maxScore = 0;
        int sum = 0;
        for (int i = 0; i < ints.length; i++) {
            sum += ints[i];
            if (sum > 100) {
                sum = 100;
            }

            // 减分
            int jianfen = 0;
            for (int j = 0; j < i; j++) {
                jianfen += (i - j) * ints[j];
            }

            System.out.println(sum - jianfen);

            maxScore = Math.max(maxScore, sum - jianfen);
        }

        System.out.println("maxScore = " + maxScore);
    }
}
